<template>
  <CompOperate
      :field="field"
      :designer="designer"
      :design-state="designState"
      :parent-list="parentList"
      :parent-widget="parentWidget"
      :sub-form-row-id="subFormRowId"
      :sub-form-row-index="subFormRowIndex"
      :sub-form-col-index="subFormColIndex"
      :index-of-parent-list="indexOfParentList"
      :display-style="field['options'].displayStyle"
  >
    <div class="scene-DRC-doctor-code-widget" :style="getStyle('head')">
      <!--诊室信息-->
      <div class="dept-room">
        <p class="room" v-if="(optionsInfo?.roomShow)" :style="getStyle('room')">
          {{ getRoomDeptInfo[optionsInfo['roomNameKey'] || 'roomName'] || '\u00a0' }}
        </p>
      </div>
      <!--      患者医生信息-->
      <div class="patient-doctor">
        <template v-for="item in getRoomDoctorInfo">
          <div class="patient-area">
            <div class="patient-area-inside">
              <div class="item flex-box current-patient-default">
                <div class="title flex-box-left" :style="getStyle('current')">就诊</div>
                <div class="content flex-box-right" :class="{'current-patient-info': scrollInfo(item)}">
                  <template v-if="true">
                    <div class="scroll-info" v-if="scrollInfo(item)">
                      <vue-seamless-scroll
                          class="scroll"
                          :ref="`scroll-${item.workerId}`"
                          @ScrollEnd="(e)=>handleScrollEnd(e, item)"
                          :class-option="optionScroll2(item['treatingPatient'])"
                          :data="(item['treatingPatient'])"
                      >
                        <template v-for="PatientItem in item['treatingPatient']">
                          <p class="item" :style="getStyle('current')">
                            <span v-if="!!PatientItem&&!!(PatientItem.orderNo)" class="patient-orderNo">
                              {{ (PatientItem.orderNo) || '&nbsp;' }}
                            </span>
                            {{ (PatientItem.patientName) || '&nbsp;' }}
                          </p>
                        </template>
                      </vue-seamless-scroll>
                    </div>
                    <p v-else :style="getStyle('current')" class="no-scroll">
                      <template v-for="PatientItem in (item['treatingPatient'])">
                        <span v-if="!!(PatientItem.orderNo)" class="patient-orderNo">
                          {{ (PatientItem.orderNo) || '&nbsp;' }}
                        </span>
                        {{ (PatientItem.patientName) || '&nbsp;' }}
                      </template>
                    </p>
                  </template>
                </div>
              </div>
              <div class="item flex-box wait-patient-default" :class="getPatientClassName('wait-patient')">
                <div class="title flex-box-left" :style="getStyle('waiting')">待诊</div>
                <template v-if="(optionsInfo.waitPatientType) ===1">
                  <div class="content flex-box-right">
                    <p v-for="(patientItem,index) in getWaitingPatientList(item.waitingPatientList)"
                       :key="`${patientItem.patientIdNo}-${index}`" :style="getStyle('waiting')">
                    <span v-if="!!(patientItem.orderNo)" class="patient-orderNo">
                      {{ (patientItem.orderNo) || '&nbsp;' }}
                    </span>
                      {{ patientItem.patientName || '&nbsp;' }}
                    </p>
                  </div>
                </template>
                <template v-if="(optionsInfo.waitPatientType) ===2">
                  <div class="content flex-box-right scroll-area"
                       :class="{'scroll-area-all': getWaitingPatientList(item.waitingPatientList).length>6 }">
                    <template
                        v-if="(optionsInfo.openScroll)&&(optionsInfo.waitPatientNumber)>(optionsInfo.waitPatientScrollNumber)">
                      <vue-seamless-scroll
                          class="scroll"
                          :ref="`scroll-${item.workerId}`"
                          @ScrollEnd="(e)=>handleScrollEnd(e, item)"
                          :class-option="optionScroll"
                          :data="getWaitingPatientList(item.waitingPatientList)"
                      >
                        <div class="inside-content" :class="getWaitPatientNumber((item.waitingPatientList), true)">
                          <div class="patient"
                               v-for="(item2,index) in getWaitingPatientList(item.waitingPatientList)"
                               :key="`${(item2.queuingId) || index}-${(item2.patientIdNo) || index}`"
                          >
                            <span class="patient-orderNo" v-if="!!(item2.orderNo)">
                              {{ item2.orderNo }}
                            </span>
                            <template>
                              {{ item2.patientName || '' }}
                            </template>
                          </div>
                        </div>
                      </vue-seamless-scroll>
                    </template>
                    <template v-else>
                      <p v-for="(patientItem,index) in getWaitingPatientList(item.waitingPatientList)"
                         :key="`${patientItem.patientIdNo}-${index}`" :style="getStyle('waiting')">
                            <span v-if="!!(patientItem.orderNo)" class="patient-orderNo">
                              {{ (patientItem.orderNo) || '&nbsp;' }}
                            </span>
                        {{ patientItem.patientName || '&nbsp;' }}
                      </p>
                    </template>
                  </div>
                </template>
              </div>
            </div>
          </div>
          <div class="doctor-area flex-box">
            <div class="doctor-area-inside">
              <div class="picture flex-box-left">
                <img :src="getDoctorPicture(item)" alt="医生" @error='handleError'/>
              </div>
              <div class="info flex-box-right">
                <div class="name-level">
                  <div class="name">{{ (item.workerName) || '&nbsp;' }}</div>
                  <div class="level">{{ (item.workerTitle) || '&nbsp;' }}</div>
                </div>

                <div class="doctor-code">
                  <div class="code-picture">
                    <img :src="(item?.workerBusinessCard) || code1" alt="医生二维码"/>
                  </div>
                  <div class="describe">医生二维码</div>
                </div>
              </div>
            </div>
          </div>
        </template>
        <div class="other-info-area">
          <div class="flex-box other-info-inside">
            <div class="flex-box-left flex-picture">
              <div class="picture-inside">
                <div class="picture">
                  <img :src="optionsInfo?.hospitalCode[0]?.url || code1" alt="互联网">
                </div>
                <p class="title">互联网医院</p>
              </div>
            </div>
            <div class="flex-box-middle describe-info">
              <ScrollEditY :content="optionsInfo?.describeContent || ''" :pageDuration="10"/>
            </div>
            <div class="flex-box-right flex-picture">
              <div class="picture-inside">
                <div class="picture">
                  <img :src="optionsInfo?.publicCode[0]?.url || code1" alt="门诊部微信公众号">
                </div>
                <p class="title">门诊部微信公众号</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </CompOperate>
</template>

<script>
import emitter from "@/utils/designer/emitter";
import {pxToVw} from '@/utils/common';
import CompOperate from "@c/public/form-designer/devType/modules/compOperate.vue";
import mixin from "@sc/templateDetails/modules/homeMiddle/fieldMixin";
import ScrollY from "@c/public/seamlessScroll/ScrollY.vue";
import ScrollEditY from "@c/public/seamlessScroll/ScrollEditY.vue";
import {buildParentApi} from "@/utils/designer/util";
import vueSeamlessScroll from 'vue-seamless-scroll';
import {bizFields, containers, customFields, sceneFields} from "@c/public/form-designer/widgetsConfig"

let buildParent = buildParentApi();
export default {
  name: "scene-DRC-doctor-code-widget",

  componentName: "FieldWidget", //必须固定为FieldWidget，用于接收父级组件的broadcast事件

  mixins: [emitter, mixin],

  components: {
    ScrollEditY,
    ScrollY,
    CompOperate,
    vueSeamlessScroll
  },

  props: {
    widget: Object,
    devType: {
      type: Boolean,
      default: false,
    },
    field: Object,
    parentWidget: Object,
    parentList: Array,
    indexOfParentList: Number,
    designer: Object,
    designState: {
      type: Boolean,
      default: false,
    },
    subFormRowIndex: {
      /* 子表单组件行索引，从0开始计数 */ type: Number,
      default: -1,
    },
    subFormColIndex: {
      /* 子表单组件列索引，从0开始计数 */ type: Number,
      default: -1,
    },
    subFormRowId: {
      /* 子表单组件行Id，唯一id且不可变 */ type: String,
      default: "",
    },
    headTitle: {
      type: String,
      default: "",
    },
    visibleTitle: {
      type: Boolean,
    },
    //prop传入的表单JSON配置
    parentApi: {
      type: Object,
      default: () => buildParentApi()
    },
  },

  data() {
    return {
      states: true,
      optionsInfo: Object(),
      code1: require("@a/images/design/placeholder-code.png"),
      code2: require("@a/images/design/code1-1.png"),
      pause: require("@a/images/design/pause.png"),
    }
  },

  computed: {
    // 候诊列表等待--滚动设置
    optionScroll() {
      let {openScroll, waitPatientScrollNumber, waitPatientStep} = (this.optionsInfo)
      return {
        hoverStop: true,
        direction: 1,                               // 0向下 1向上 2向左 3向右
        isSingleRemUnit: true,
        step: [1, 1.5, 2, 2.5, 3][waitPatientStep - 1], // 数值越大速度滚动越快
        limitMoveNum: openScroll ? waitPatientScrollNumber : 999999, // 开始无缝滚动的数据量 this.dataList.length
      };
    },

    optionScroll2() {
      return function (params) {
        if (!!params && !!(params.length) && (params.length) === 1) {
          return {
            hoverStop: true,
            direction: 1,                               // 0向下 1向上 2向左 3向右
            isSingleRemUnit: true,
            step: [1, 1.5, 2, 2.5, 3][0], // 数值越大速度滚动越快
            limitMoveNum: 9999, // 开始无缝滚动的数据量 this.dataList.length
          };
        } else {
          return {
            hoverStop: true,
            direction: 1,                               // 0向下 1向上 2向左 3向右
            isSingleRemUnit: true,
            step: [1, 1.5, 2, 2.5, 3][0], // 数值越大速度滚动越快
            limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
          };
        }

      }

    },

    // 判断当前患者是否滚动
    scrollInfo() {
      return function (info) {
        return !!(info.treatingPatient) && (info.treatingPatient.length) > 1
      }
    },

    // 候诊等待
    getWaitPatientNumber() {
      return function (row, scroll) {
        let waitingPatientList = this.getWaitingPatientList(row);
        if (scroll) {
          if (Array.isArray(waitingPatientList)) {
            return `scroll-area-${waitingPatientList.length}`
          } else {
            return `scroll-area`
          }
        } else {
          if (Array.isArray(waitingPatientList)) {
            if (waitingPatientList.length >= 6) {
              return `no-scroll-area-6`
            } else {
              return `no-scroll-area-${waitingPatientList.length}`
            }

          } else {
            return `no-scroll-area`
          }
        }

      }
    },

    // 设置的行内样式
    getStyle() {
      return function (val) {
        const self = this;
        let info = (self.optionsInfo) || Array();
        let Obj = Object();
        switch (val) {
          case 'head':
            Reflect.set(Obj, 'height', pxToVw(info.headHeight));
            Reflect.set(Obj, 'backgroundColor', `${(info.backgroundColor)}`);
            return Obj;
          case 'picture':
            Reflect.set(Obj, 'height', pxToVw(info.imageHeight));
            Reflect.set(Obj, 'width', pxToVw(info.imageWidth));
            Reflect.set(Obj, 'borderRadius', pxToVw(info.imageRadius));
            return Obj;
          case 'room':
            Reflect.set(Obj, 'fontSize', pxToVw(info.roomFontsize));
            Reflect.set(Obj, 'fontWeight', (info.roomFontWeight));
            return Obj;
          case 'current':
            Reflect.set(Obj, 'fontWeight', (info?.current?.fontWeight));
            return Obj;
          case 'waiting':
            Reflect.set(Obj, 'fontWeight', (info?.waiting?.fontWeight));
            return Obj;

        }
      }
    },

    // 设置不同模式下的样式
    getPatientClassName() {
      let {waitMode, waitingPatientHide, waitPatientNumber, waitPatientType} = (this.optionsInfo);
      return function (type) {
        if (!waitingPatientHide) {
          if (waitPatientType === 1) {
            switch (type) {
              case 'current-patient':
                return (parseInt(waitMode) >= 1 || parseInt(waitPatientNumber) >= 1) && 'current-patient2'
              case 'wait-patient':
                switch (waitMode) {
                  case 1:
                    return 'wait-patient-default'
                  case 2:
                    return 'wait-patient2'
                  case 3:
                    return 'wait-patient3'
                  case 4:
                    return 'wait-patient4'
                  case 5:
                    return 'wait-patient5'
                  case 6:
                    return 'wait-patient6'
                }
            }
          } else {
            switch (type) {
              case 'current-patient':
                return (parseInt(waitMode) >= 1 || parseInt(waitPatientNumber) >= 1) && 'current-patient2'
              case 'wait-patient':
                switch (waitPatientNumber) {
                  case 1:
                    return 'wait-patient-default'
                  case 2:
                    return 'wait-patient2'
                  case 3:
                    return 'wait-patient3'
                  case 4:
                    return 'wait-patient4'
                  case 5:
                    return 'wait-patient5'
                  case 6:
                    return 'wait-patient6'
                }
            }
          }
        } else {
          return 'hide-waiting-patient'
        }
      }
    },

    // 候诊患者截取
    getWaitingPatientList() {
      return function (row) {
        let {waitMode, waitPatientNumber, waitPatientType} = (this.optionsInfo);
        if (waitPatientType === 1) {
          if (!!row && !!(row.length)) {
            return row.slice(0, waitMode || 1)
          } else {
            return [];
          }
        } else {
          if (!!row && !!(row.length)) {
            return row.slice(0, waitPatientNumber || 1)
          } else {
            return [];
          }
        }

      }
    },

    // 获取科室信息
    getRoomDeptInfo() {
      let devType = (this.devType);
      let roomDoctorInfo = this.$store.getters['getRoomDeptInfo'];
      if (devType) {
        return roomDoctorInfo.apiData;
      } else {
        return roomDoctorInfo.mockData;
      }
    },

    // 获取全量医患信息
    getRoomDoctorInfo() {
      let temp = Array();
      let devType = (this.devType);
      let roomDoctorInfo = this.$store.getters['getRoomDoctorInfo'];
      if (devType) {
        if (!!(roomDoctorInfo?.apiData?.length)) {
          return roomDoctorInfo.apiData.slice(0, 1);
        } else {
          temp.push({});
          return temp;
        }
      } else {
        if (!!(roomDoctorInfo?.mockData?.length)) {
          return roomDoctorInfo.mockData.slice(0, 1);
        } else {
          temp.push({});
          return temp;
        }
      }
    },

    // 获取医生头像
    getDoctorPicture() {
      return function (row) {
        let isPause = (row.isPause);
        let header = '/tpleditor/resource/assets/images/header.png';
        if (!isPause) {
          return (row.workerPicture) || header
        } else {
          return this.pause;
        }
      }
    },

  },

  created() {
    this.registerToRefList();
    this.initEventHandler();
    this.handleOnCreated();
  },

  mounted() {
    this.handleOnMounted();
    // this.executeMethod('roomDeptInfo',{data:'测试'})
  },

  methods: {
    // 接收父组件传递过来的数据
    executeMethod(key, data) {
      switch (key) {
        case "roomDeptInfo":
          console.log(`科室信息-${data}`)
          this.states = true;
          buildParent.executeParentMethod('writeLog', JSON.stringify({sign: '模板-科室信息', key: key, data: data}))
          // this.parentApi.executeParentMethod('writeLog', JSON.stringify({sign:'模板日志-科室信息',key:key,data:data}));
          this.$store.dispatch('setRoomDeptInfo', data);
          break;
        case "roomDoctorInfo":
          console.log(`医生信息-${data}`);
          this.states = true;
          buildParent.executeParentMethod('writeLog', JSON.stringify({sign: '模板-医生信息', key: key, data: data}))
          // this.parentApi.executeParentMethod('writeLog', JSON.stringify({sign:'模板日志-医生信息',key:key,data:data}));
          this.$store.dispatch('setRoomDoctorInfo', this.$lodash.cloneDeep(data));
          break;
      }
    },

    // 图片加载失败
    handleError() {
      this.states = true;
    },

    handleScrollEnd() {

    },
  },

  watch: {
    // 获取配置项
    field: {
      handler: function (val) {
        let comps = this.$lodash.concat(containers, bizFields, customFields, sceneFields);
        let type = (val.type);
        const originalComp = this.$lodash.find(comps, {type: type});
        let originalKey = originalComp['options']['config'];
        let valKey = val['options']['config'];
        let originalOptions = originalComp['options'][originalKey];
        let valOptions = val['options'][valKey];
        this.optionsInfo = {...originalOptions, ...valOptions};
        return false
        // let key = (val.options.config);
        // let data = val.options[key];
        // this.optionsInfo = data;
      },
      deep: true,
      immediate: true
    }
  },

  destroyed() {
    this.unregisterFromRefList();
  },


};
</script>

<style lang="scss" scoped>
.scene-DRC-doctor-code-widget {
  padding: 28px 30px;
  box-sizing: border-box;
  flex: inherit;
  flex-direction: column;
  justify-content: space-between;
  color: #333;
  height: 150px;
  font-size: 40px;
  background: transparent;
  overflow: hidden;
  //科室
  .dept-room {
    padding: 20px 0 0 0;
    background: #0059B3;
    border-radius: 20px;
    height: 160px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;

    .room {
      align-self: center;
      text-align: center;
      justify-content: center;
      font-size: 80px;
      color: #EBEEF5;
      padding: 0 20px;
      font-weight: normal;
      @include singleEllipsis(100%);
    }
  }

  // 患者医生信息
  .patient-doctor {
    overflow: hidden;
    height: calc(100% - 196px);
    display: flex;
    flex-direction: column;

    .patient-area {
      flex-basis: calc(45%);
      flex-shrink: 0;
      padding-top: 10px;
      box-sizing: border-box;
      //患者信息
      .patient-area-inside {
        height: 100%;
        width: 100%;

        .item {
          display: flex;
          overflow: hidden;
          border-radius: 20px;
          min-width: 100%;
          box-sizing: border-box;

          .title {
            color: white;
            align-items: center;
            align-self: center;
            text-align: center;
            height: 100%;
            padding: 0 30px;
            line-height: 90px;
            flex: inherit;
            display: flex;
            width: 124px !important;
            font-size: 60px;
          }

          .content {
            display: flex;
            align-items: center;
            flex-direction: column;
            align-self: center;
            justify-content: left;
            background: transparent;
            border: none;
            width: calc(100% - 124px) !important;

            p {
              font-size: 92px;
              width: 100%;

            }
          }

          .current-patient-info {
            height: 100%;
            display: flex;
            align-self: center;
            align-items: center;
            padding-left: 186px;

            .scroll-info {
              width: 100%;
              overflow: hidden;
              margin-top: 20px;
              height: calc(100% - 40px);
              box-sizing: border-box;

              p {
                height: 100%;
                width: 100%;
                display: flex;
                font-size: 90px;
                justify-content: left;
                margin-bottom: 20px;
                @include singleEllipsis(100%);
                line-height: 166px !important;

                :deep(.patient-orderNo) {
                  display: inline-flex;
                  min-width: 120px;
                  border-radius: 12px;
                  overflow: hidden;
                  background: rgba(0, 89, 179, 1);
                  color: white;
                  padding: 0 20px;
                  margin-right: 12px;
                  justify-content: center;
                }
              }
            }

          }
        }

        .current-patient-default {
          height: 240px;
          background: rgba(0, 89, 179, 0.2);

          .title {
            background: rgba(0, 89, 179, 1);
          }

          p {
            color: rgba(0, 89, 179, 1);
            text-align: left;
            font-size: 106px;
          }

          .no-scroll {
            margin-left: 360px;
            font-size: 104px !important;
            line-height: 166px !important;

            :deep(.patient-orderNo) {
              display: inline-flex;
              min-width: 120px;
              border-radius: 12px;
              overflow: hidden;
              background: rgba(0, 89, 179, 1);
              color: white;
              padding: 0 20px;
              margin-right: 12px;
              justify-content: center;
            }
          }
        }


        .wait-patient-default {
          height: 340px;
          min-width: 100%;
          margin-top: 34px;
          background: rgba(255, 198, 85, 0.2);

          .title {
            background: rgba(229, 134, 2, 1);
          }

          p {
            color: rgba(229, 134, 2, 1);
            font-size: 104px !important;
            text-align: center;
            line-height: 166px !important;
            display: flex;
            justify-content: left;
            align-self: center;
            align-items: center;
            margin-left: 360px;
            overflow: hidden;
            @include singleEllipsis(100%);
            white-space: nowrap;

            :deep(.patient-orderNo) {
              background: rgba(229, 134, 2, 1);
              display: inline-flex;
              min-width: 120px;
              border-radius: 12px;
              overflow: hidden;
              color: white;
              padding: 0 20px;
              margin-right: 24px;
              justify-content: center;
            }
          }
        }

        .wait-patient2 {
          height: 340px;

          p {
            text-align: left;
            line-height: 152px !important;
            font-size: 104px !important;

            &:last-child {
              margin-top: 20px;
            }
          }
        }

        .wait-patient3,
        .wait-patient4 {
          height: 340px;

          .content {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            margin-left: 40px;

            p {
              flex-basis: 50%;
              font-size: 84px !important;
              text-align: left;
              line-height: 117px !important;
              @include singleEllipsis(100%);
              display: flex;
              justify-content: left;
              align-self: center;
              margin-left: 0 !important;

              &:nth-child(3) {
                margin-top: 20px;
              }

              &:nth-child(4) {
                margin-top: 20px;
              }
            }
          }
        }

        .wait-patient5,
        .wait-patient6 {
          height: 340px;

          .content {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            margin-left: 40px;

            p {
              flex-basis: 50%;
              text-align: left;
              font-size: 70px !important;;
              line-height: 94px !important;
              display: flex;
              justify-content: left;
              align-self: center;
              margin-left: 0 !important;

              &:nth-child(3) {
                margin-top: 20px;
              }

              &:nth-child(4) {
                margin-top: 20px;
              }

              &:nth-child(5) {
                margin-top: 20px;
              }

              &:nth-child(6) {
                margin-top: 20px;
              }
            }
          }
        }
      }
    }

    .doctor-area {
      border-radius: 18px 18px 0 0;
      margin-top: 20px;
      box-sizing: border-box;
      overflow: hidden;
      min-height: calc(30%);
      flex-basis: calc(30%);


      .doctor-area-inside {
        width: 100%;
        padding: 40px 50px 4px 50px;
        display: flex;
        justify-content: flex-start;
        box-sizing: border-box;
        background: white;
        border: none;

        .picture {
          display: flex;
          justify-content: flex-start;
          overflow: hidden;
          border-radius: 12px;
          min-width: 320px;
          max-width: 320px;
          flex: initial;
          margin-right: 30px;
          background: transparent;
          border: 1px rgba(102, 102, 102, 0.44) solid;

          img {
            width: 100%;
            object-fit: cover;
          }
        }

        .info {
          flex: inherit;
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          width: calc(100% - 340px);
          border: none;
          flex: initial;
          background: transparent;

          .name-level {
            .name {
              font-size: 70px;
              line-height: 120px;
              font-weight: 500;
            }

            .level {
              font-size: 46px;
              font-weight: 500;
              line-height: 74px;
              padding-top: 8px;
              padding-bottom: 26px;
            }
          }

          .doctor-code {
            width: 200px;
            min-height: 200px;
            max-height: 250px;
            background: #E5EAEF;
            border-radius: 8px;
            padding: 15px;
            flex-shrink: 0;
            align-self: flex-end;

            .code-picture {
              width: 200px;
              height: 200px;
              background: #E8E8E8;
              margin-bottom: 16px;

              img {
                width: 100%;
                height: 100%;
              }
            }

            .describe {
              text-align: center;
              width: 100%;
              font-size: 30px;
              color: #333333;
              line-height: 42px;
            }
          }
        }
      }
    }

    :deep(.other-info-area) {
      overflow: hidden;
      border-radius: 0 0 18px 18px;
      height: calc(100% - 30% - 45% - 18px);
      min-height: calc(100% - 30% - 45% - 18px);
      flex-basis: calc(100% - 30% - 45% - 18px);
      background: white;

      .other-info-inside {
        margin: 40px 20px 0 20px;
        box-sizing: border-box;
        height: calc(100% - 40px);

        .describe-info {
          border: none;
          @include multiLineEllipsis(4);
          font-size: 34px;
          height: calc(100% - 40px);
          overflow: hidden;
          line-height: 62px;
        }

        .flex-picture {
          min-width: 30%;
          flex: initial;
          border: none;

          .picture-inside {
            padding: 0 32px;
            width: 100%;
            background: transparent;

            .picture {
              width: 100%;
              height: 220px;
              min-height: 220px;
              max-height: 220px;
              display: flex;
              overflow: hidden;
              align-items: center;
              align-self: center;
              justify-content: center;
              margin-bottom: 16px;

              img {
                width: 220px;
                height: 220px;
                border-radius: 8px;
                overflow: hidden;
                object-fit: fill;
              }
            }

            .title {
              width: 100%;
              font-weight: 400;
              font-size: 30px;
              color: #333333;
              line-height: 41px;
              text-align: center;
            }
          }
        }
      }
    }

  }

}
</style>
